package com.info.zhiduoduo.repository.entity.notice;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * @author tianyonghong
 * @create 2023/3/20
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
@TableName("zdd_notice_read_record")
public class NoticeReadRecord extends Model<NoticeReadRecord> {

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("系统消息ID")
    private Integer noticeId;

    @ApiModelProperty("用户ID")
    private Integer userId;

    /**
     * 参考 {@link com.info.zhiduoduo.common.constants.system.UserType}
     */
    @ApiModelProperty("系统用户类型")
    private Integer userType;

    private Date createTime;

    @Override
    protected Serializable pkVal(){
        return id;
    }
}
